Security News
The Risks of Misguided Research in Supply Chain Security
Snyk's use of malicious npm packages for research raises ethical concerns, highlighting risks in public deployment, data exfiltration, and unauthorized testing.
@babel/plugin-syntax-async-generators
Advanced tools
The @babel/plugin-syntax-async-generators package allows Babel to parse code that uses async generator functions. These are functions that can pause execution and resume asynchronously, making them useful for handling streams of data or other asynchronous operations in a more readable way than using Promises or callbacks alone.
Parsing async generator functions
This code defines an async generator function that yields numbers from 0 to 2. The @babel/plugin-syntax-async-generators package allows Babel to understand and parse this syntax.
async function* asyncGenerator() {
var i = 0;
while (i < 3) {
yield i++;
}
}
This package transforms async functions to generator functions. While @babel/plugin-syntax-async-generators only enables parsing of async generator syntax, @babel/plugin-transform-async-to-generator goes further by transforming async functions into a form that can be executed in environments that do not support async functions natively.
A Babel preset that includes @babel/plugin-syntax-async-generators among many other plugins. It allows you to use the latest JavaScript without needing to micromanage which syntax transforms (and thus plugins) are needed for your target environment. It compares to @babel/plugin-syntax-async-generators by providing a broader range of JavaScript feature support, including but not limited to async generators.
Allow parsing of async generator functions
See our website @babel/plugin-syntax-async-generators for more information.
Using npm:
npm install --save-dev @babel/plugin-syntax-async-generators
or using yarn:
yarn add @babel/plugin-syntax-async-generators --dev
FAQs
Allow parsing of async generator functions
The npm package @babel/plugin-syntax-async-generators receives a total of 20,605,432 weekly downloads. As such, @babel/plugin-syntax-async-generators popularity was classified as popular.
We found that @babel/plugin-syntax-async-generators demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 6 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Snyk's use of malicious npm packages for research raises ethical concerns, highlighting risks in public deployment, data exfiltration, and unauthorized testing.
Research
Security News
Socket researchers found several malicious npm packages typosquatting Chalk and Chokidar, targeting Node.js developers with kill switches and data theft.
Security News
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.